package org.tcx.core.logic.contrl;

import java.util.List;

import org.tcx.core.db.bean.TestCase;
import org.tcx.core.db.dao.DAOFactory;
import org.tcx.core.db.dao.TestCaseDAO;
import org.tcx.core.db.dao.hibernate.HibernateDAOFactory;

public class TestCaseContrl {
	public List<TestCase> findAllTestCase(){
		DAOFactory daoFactory = HibernateDAOFactory.instance(DAOFactory.HIBERNATE);
		TestCaseDAO dao =daoFactory.getTestCaseDAO();
		List<TestCase> list =dao.findAll();
		return list;
	} 
	public void makePersistent(TestCase testCase){
		DAOFactory daoFactory = HibernateDAOFactory.instance(DAOFactory.HIBERNATE);
		TestCaseDAO dao =daoFactory.getTestCaseDAO();
		dao.makePersistent(testCase);
	}
}
